import { createApp } from 'vue'
import './style.css'
import App from './App.vue'
import router from './router'
import { store,key } from './store'
import  * as ElIcons from '@element-plus/icons'
import * as ElementUI from 'element-plus'
const  app = createApp(App)
for (const name in ElIcons){
    app.component(name,(ElIcons as any)[name])
}
app.use(router).use(store,key).mount("#app");

declare module '@vue/runtime-core'{
    export interface ComponentCustomProperties {
      $Alert: (a: string) => Promise<void>;
      $Notify: any;
      $Confirm: (a: string) => Promise<void>;
    }
}

app.config.globalProperties.$Alert = ElementUI.ElMessageBox.alert
app.config.globalProperties.$Confirm = ElementUI.ElMessageBox.confirm
app.config.globalProperties.$Notify = ElementUI.ElNotification